{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "0c481241",
   "metadata": {},
   "source": [
    "# Сигма-алгебра"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "da41fdb0",
   "metadata": {},
   "source": [
    "<strong>Сигма-алгебра</strong> (σ-алгебра) - множество событий F, которое соблюдает следующие условия:\n",
    "\n",
    " 1. Ω ∈ ℬ\n",
    " 2. Если A ∈ ℬ, то ¬A ∈ ℬ\n",
    " 3. Если A₁, A₂, ... ∈ ℬ, то A₁ U A₂ U ... ∈ ℬ (отличается от алгебры событий тем, что количество событий может быть счетным, а не конечным)\n",
    "\n",
    "На конечном множестве Ω, понятия алгебры событий и σ-алгебры совпадают.\n",
    "\n",
    "<strong>Минимальная сигма-алгебра</strong> - это наименьшая σ-алгебра, содержащая все события, которые мы хотим рассматривать. Пример для подброшенной монеты { 'Орел', 'Решка', ∅, Ω }\n",
    "\n",
    "<strong>Борелевская сигма-алгебра</strong> - это минимальная σ-алгебра, которая содержит все открытые и замкнутые множества на числовой прямой (или в n-мерном пространстве), а также все их возможные объединения и пересечения. \n",
    "\n",
    "<strong>Полная система событий</strong> - система случайных событий, такая, что в результате проведенного эксперимента, непременно произойдет одно из этих событий.\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9dabfffa",
   "metadata": {},
   "source": [
    "<strong>Пример: ресторан в шаговой доступности</strong>\\\n",
    "Данные взяты с ресурса: https://www.kaggle.com/datasets/jeffreybraun/chipotle-locations \\\n",
    "Пример взят с https://www.youtube.com/watch?v=C_AftHtjuhc&ab_channel=GetSomeMath \n",
    "\n",
    "1. Событие A = \\[0; 100\\] - ближайший ресторан в радиусе ста метров\n",
    "2. Событие B = \\(100; 1000\\) \n",
    "3. Событие C = \\[1000; +∞\\] - ресторан дальше километра \n",
    "\n",
    "Строим σ-алгебру:\n",
    "1. ℬ = { ∅, A, B, C } - <i>не является</i> σ-алгеброй, так как нет дополнения ∅\n",
    "2. ℬ = { ∅, Ω, A, B, {A U B}, {A U C}, {B U C} } - <i>является</i> σ-алгебра"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "2f81eefa",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>state</th>\n",
       "      <th>location</th>\n",
       "      <th>address</th>\n",
       "      <th>latitude</th>\n",
       "      <th>longitude</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1646</th>\n",
       "      <td>New York</td>\n",
       "      <td>New York</td>\n",
       "      <td>1 New York Plz New York, NY 10004 US</td>\n",
       "      <td>40.702026</td>\n",
       "      <td>-74.011869</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1647</th>\n",
       "      <td>New York</td>\n",
       "      <td>New York</td>\n",
       "      <td>100 Maiden Ln New York, NY 10038 US</td>\n",
       "      <td>40.706796</td>\n",
       "      <td>-74.007037</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1648</th>\n",
       "      <td>New York</td>\n",
       "      <td>New York</td>\n",
       "      <td>1020 3rd Ave New York, NY 10065 US</td>\n",
       "      <td>40.762630</td>\n",
       "      <td>-73.966143</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1649</th>\n",
       "      <td>New York</td>\n",
       "      <td>New York</td>\n",
       "      <td>111 Fulton St New York, NY 10038 US</td>\n",
       "      <td>40.709927</td>\n",
       "      <td>-74.006561</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1650</th>\n",
       "      <td>New York</td>\n",
       "      <td>New York</td>\n",
       "      <td>1153 Third Avenue New York, NY 10065 US</td>\n",
       "      <td>40.766638</td>\n",
       "      <td>-73.962534</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         state  location                                  address   latitude   \n",
       "1646  New York  New York     1 New York Plz New York, NY 10004 US  40.702026  \\\n",
       "1647  New York  New York      100 Maiden Ln New York, NY 10038 US  40.706796   \n",
       "1648  New York  New York       1020 3rd Ave New York, NY 10065 US  40.762630   \n",
       "1649  New York  New York      111 Fulton St New York, NY 10038 US  40.709927   \n",
       "1650  New York  New York  1153 Third Avenue New York, NY 10065 US  40.766638   \n",
       "\n",
       "      longitude  \n",
       "1646 -74.011869  \n",
       "1647 -74.007037  \n",
       "1648 -73.966143  \n",
       "1649 -74.006561  \n",
       "1650 -73.962534  "
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "\n",
    "dataframe = pd.read_csv('datasets/chipotle_stores.csv')\n",
    "dataframe = dataframe[dataframe.location.eq('New York')] # только из New York\n",
    "\n",
    "dataframe.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "39049a45",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<seaborn.axisgrid.FacetGrid at 0x2ccf48eb0d0>"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAesAAAHqCAYAAAAkr2YEAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAABHIElEQVR4nO3dfVyUVd4/8M8MwzMMyIOgiWhFIWuo4C/FCjXZqKXd1GnvXWN3y0W7u28wkDJi293STGx9XCmTu/W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OnClCQ0MVX/vVdu/eLTQajaiurrbp3/fBqn3x4sUCgNDr9ebXlJaW2sXfme78/ve/F2PGjFF87db8+9Udhw/r2tpacfz48V4f115/XbFihQgMDOxy/czHx0c4OTmZH2q1WgAQTk5OYuvWrd2+/1/+8hcxadIkSdvZs2cFgC4TyPbs2SPc3d3Fu+++a3e1CyENa3uo/Y477ugyErBt2zbh5eVls9q78+qrrwp3d3fR1tbW6/M6OjrE+fPnRVNTk/jmm28EAPH5559LntP5bb6lpUXs379fABCffPKJomv/85//3OU6X2VlpQAg9uzZo+jar3bnnXeKuXPnCiFs+/d9sGr/61//KjQajeT5TU1NAoD4xz/+oejau/PCCy+IkSNHKv73bs2/X91x+FtkBgYGIjAw0OLnCyGwfft2/OEPf+hy/ay4uBjt7e3mn99++208//zz+PTTT823y7xWTEwMnnvuOdTW1mLkyJEAgIMHD0Kr1SIiIsL8vD179uCPf/wjcnNzkZCQYFe1d8ceao+JicH+/fslrzt48CBuu+02hIeH26T27nR0dMBkMqGjowNOTk49Pk+lUmH06NEAfvr7ERISgqioKMlznJyczL+DPXv2ICYmBjNmzFB07U1NTVCrpdNlOvsaO3asxb97OX/v3377LQ4dOmS+bmrLv++DVfttt92GtrY2nDlzBjfccAMA4OTJkwCAO+64AzfddJNia+/O0aNHcd111yn+/1Vr/v3qqXi6ygcffNDt0El3uhvOeOONN8TNN99s/rlzCdFdd90ljh49Kg4cOCACAwMlywF27dolNBqNePHFFyVLC+rr6xVfuxBClJeXi/LychEdHS0eeOABUV5eLr7++mvF1965dGvZsmXi+PHj4sUXX+zX0i1Lan/ttdfEP//5T/HNN9+IM2fOiH/+859i9OjRIjExscfahRDib3/7m/jyyy/FV199JVasWCGcnZ3Fm2++aT5+8eJF8dJLL4njx4+L8vJy8eijjwo3Nzfx2WefKb72goICoVKpxPLly8XJkydFaWmpiI+PF6Ghof2aKyBH7Z3+/Oc/i9GjR/d5xqWk2tvb20VUVJSIjY0VZWVl4osvvhDTpk0TP//5zxVf+44dO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==",
      "text/plain": [
       "<Figure size 500x500 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "import seaborn as sns\n",
    "\n",
    "sns.relplot(x = 'longitude', y = 'latitude', data = dataframe)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c1ad89de",
   "metadata": {},
   "source": [
    "Переводим из широты и долгоды в X, Y"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "216f4a43",
   "metadata": {},
   "outputs": [],
   "source": [
    "import math\n",
    "\n",
    "center_latitude = (dataframe['latitude'].min() + dataframe['latitude'].max()) / 2.0\n",
    "center_longitude = (dataframe['longitude'].min() + dataframe['longitude'].max()) / 2.0\n",
    "\n",
    "earth_radius = 6371.0 * 10**3\n",
    "\n",
    "def to_cartesian(angle, center):\n",
    "    return earth_radius * (angle - center) * math.pi / 180\n",
    "\n",
    "def to_y(lat):\n",
    "    return to_cartesian(lat, center_latitude)\n",
    "\n",
    "def to_x(long):\n",
    "    return to_cartesian(long, center_longitude)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "51239f81",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>y</th>\n",
       "      <th>x</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1646</th>\n",
       "      <td>-7754.434623</td>\n",
       "      <td>-3752.379535</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1647</th>\n",
       "      <td>-7224.034428</td>\n",
       "      <td>-3215.102768</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1648</th>\n",
       "      <td>-1015.588459</td>\n",
       "      <td>1332.147658</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1649</th>\n",
       "      <td>-6875.939378</td>\n",
       "      <td>-3162.151237</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1650</th>\n",
       "      <td>-569.890201</td>\n",
       "      <td>1733.448436</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                y            x\n",
       "1646 -7754.434623 -3752.379535\n",
       "1647 -7224.034428 -3215.102768\n",
       "1648 -1015.588459  1332.147658\n",
       "1649 -6875.939378 -3162.151237\n",
       "1650  -569.890201  1733.448436"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cartesian_dataset = dataframe\\\n",
    "    .transform({ 'latitude': to_y, 'longitude': to_x })\\\n",
    "    .rename(columns = { 'latitude': 'y', 'longitude': 'x' })\n",
    "\n",
    "cartesian_dataset.head()    "
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e62b5032",
   "metadata": {},
   "source": [
    "Делаем функцию для создания случайной точки между ресторанами и функцию для нахождения расстояния до ближайшего расстояния"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "2058ef67",
   "metadata": {},
   "outputs": [],
   "source": [
    "import random\n",
    "\n",
    "def random_point():\n",
    "    return\\\n",
    "        random.uniform(cartesian_dataset['x'].min(), cartesian_dataset['x'].max()),\\\n",
    "        random.uniform(cartesian_dataset['y'].min(), cartesian_dataset['y'].max())\n",
    "\n",
    "def smallest_distance(point, data):\n",
    "    min_distance = math.inf\n",
    "    for i, row in data.iterrows():\n",
    "        distance = math.sqrt((point[0] - row['x']) ** 2 + (point[1] - row['y']) ** 2)\n",
    "        if distance < min_distance:\n",
    "            min_distance = distance\n",
    "    return min_distance"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "3a5a89d5",
   "metadata": {},
   "source": [
    "Проводим эксперименты чтобы установить вероятность событий A, B, C"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "e61f55fb",
   "metadata": {},
   "outputs": [],
   "source": [
    "N = 1_000\n",
    "\n",
    "N_A = 0\n",
    "N_B = 0\n",
    "N_C = 0\n",
    "\n",
    "for i in range(N):\n",
    "    dot = random_point()\n",
    "    distance = smallest_distance(dot, cartesian_dataset)\n",
    "    \n",
    "    if distance <= 100:\n",
    "        N_A += 1\n",
    "    if distance > 100 and distance < 1_000:\n",
    "        N_B += 1\n",
    "    if distance >= 1_000:\n",
    "        N_C += 1"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2585c4ec",
   "metadata": {},
   "source": [
    "Вероятность события (ресторан в радиусе ста метров) <i>A = N_A / N</i>:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "e7b9a7bf",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " P(A) = 0.011 \n",
      " P(B) = 0.319 \n",
      " P(C) = 0.67\n"
     ]
    }
   ],
   "source": [
    "print(' P(A) =', N_A / N, '\\n', 'P(B) =', N_B / N, '\\n', 'P(C) =', N_C / N)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "b1f5bb66",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "P(Ω) = 1.0\n"
     ]
    }
   ],
   "source": [
    "print('P(Ω) =', (N_A / N) + (N_B / N) + (N_C / N))"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
